import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

import index from '@/views/index.vue'; //

const Routers = [
  {
    path: '/',
    name: 'home',
    meta: { title: '默认路由', desc: '默认路由' },
    component: index
  }
];

// 创建路由实例
const createRouter = () =>
  new Router({
    scrollBehavior: () => ({ y: 0 }),
    routes: Routers
  });

// 导出路由实例
export default createRouter();
